﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Zatify.WebUI.Infrastructure.ValidationAttributes;
using System.Web.Mvc;

namespace Zatify.WebUI.Admin.Models
{
    public enum SendingToUsersType
    {
        AllUsers = 1,
        BusinessUsers = 2,
        EndUsers = 3,
        IndividualUser = 4
    }

    public class SendNewMessageViewModel
    {
        public SendingToUsersType SendingToUsersType { get; set; }

        [Remote("IsUserIDExist", "MessageCenter", ErrorMessage = "Invalid User ID entered")]
        [RequiredIf("SendingToUsersType", SendingToUsersType.IndividualUser, ErrorMessage = "Enter individual user's id")]
        public string IndividualUserId { get; set; }

        [Required(ErrorMessage = "Enter message subject")]
        public string Subject { get; set; }

        [Required(ErrorMessage = "Enter message body")]
        public string Body { get; set; }
    }
}